package org.karelun.whiteboard.gef.ui.actions;

import java.util.Collection;

import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.edit.command.CopyToClipboardCommand;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;

public class CopyAction extends SelectionAction{

	public CopyAction(IEditorPart editor) {
		super(editor);
		setId(ActionFactory.COPY.getId());
	}

	@Override
	protected Command createCommand() {
		Collection<Object> collection = getSelectedEditPartModels();
		return CopyToClipboardCommand.create(getEditingDomain(), collection);
	}
}
